package com.esiran.payadmin.controller;

import com.esiran.payadmin.entity.Resp;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

@Controller
@RequestMapping("/user/goods/list")
public class UserGoodsController {
    @Autowired
    public UserGoodsController() {
    }

    @GetMapping
    public String index() {
        return "user/goods/list";
    }

    @GetMapping("/create")
    public String create() {
        return "user/goods/list_create";
    }

    @ResponseBody()
    @PostMapping("/create")
    public Resp<Void> createForm() {
        return Resp.empty();
    }

    @GetMapping("/{id}")
    public String index(@PathVariable String id) {
        return "user/goods/list";
    }

    @PostMapping("/{id}")
    @ResponseBody
    public Resp<Void> update(@PathVariable String id) {
        return Resp.empty();
    }

    @GetMapping("/del")
    @ResponseBody
    public Resp<Void> del(@RequestParam String id) {
        return Resp.empty();
    }
}
